import yyComponent from "../Common/yyComponent";
import { GAME_MODE } from "../frameSccript/other/game/gameMode_Json";
import { mgrs, sers } from "../frameSccript/system/OverallSystem ";

const {ccclass, property} = cc._decorator;

@ccclass
export default class item extends yyComponent {

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    @property(Number)
    public gameList: number = 1;

    start () {
        // this.node.on(cc.Node.EventType.TOUCH_START,this.startGame,this)
    }

    startGame(){
        mgrs().soundMgr.playSound('click');
        if(this.gameList>=0){
            sers().userSrv.setGameList(this.gameList)
            mgrs().gameMgr.enterMode(GAME_MODE.NORMAL);
        }
    }

    // update (dt) {}
}
